package com.hbnu.pojo;

public class User {
    private String username;

    public User(String username){
        this.username = username;
    }

    /*
    public void printProperty(){
        System.out.println("通过有参构造方式注入属性值："+this.username);
    }
    */

    public void setUsername(String username) {
        this.username = username;
    }

    public void printProperty(){
        System.out.println("通过setter方式注入属性值："+this.username);
    }

}





















